<?php
$this->widget('application.extensions.fancybox.EFancyBox', array('target' => '.product', 'config' => array('width' => 800, 'height' => 520,'type'=>'iframe','hideOnOverlayClick'=>false)));
?>
<script>
function fill(code) {
    $("#Product_VendorCode").val(code);
}
</script>
<div style="width:100%; float:left; margin-bottom:10px; text-align:right;">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'pricing-form',
	'htmlOptions'=>array('name'=>'jobForm'),
	'enableAjaxValidation'=>false,
)); ?>
	<?php echo $form->errorSummary($model); ?>

	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="20%" class="td_right"><?php echo $form->label($model,'ProductModel'); ?>: </td>
			<td width="30%">
				<?php echo $form->textField($model,'ProductModel',array('class'=>'disabled input_size4','disabled'=>'disabled')); ?>
			</td>
			<td width="20%" class="td_right"><?php echo $form->label($model,'PModel_2'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'PModel_2',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'Category'); ?>: </td>
			<td>
				<?php
				echo $form->dropDownList($model, 'Category', $data['classes'], array(
					'empty' => '请选择',
					'class'=>'input_size6',
					'ajax' => array(
						'url' => Yii::app()->createUrl('Psi/dynamicClass'),
						'data' => array('class' => 'js:this.value'),
						'update' => '#Product_SubCategory',
					),
				));
				?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'SubCategory'); ?>: </td>		
			<td>
				<?php echo $form->dropDownList($model, 'SubCategory', $data['subclasses'],array('empty'=>array(''=>'请选择'),'class'=>'input_size6')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'OF1'); ?>: </td>
			<td>
				<?php
				echo $form->dropDownList($model, 'OF1', $data['OF1'], array(
					'empty' => '请选择',
					'class'=>'input_size6',
					'ajax' => array(
						'url' => Yii::app()->createUrl('Psi/dynamicClass'),
						'data' => array('class' => 'js:this.value'),
						'update' => '#Product_OF2',
					),
				));
				?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'OF2'); ?>: </td>		
			<td>
				<?php echo $form->dropDownList($model, 'OF2', $data['OF2'],array('empty'=>array(''=>'请选择'),'class'=>'input_size6')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'ProductName'); ?>: </td>
			<td colspan="3">
				<?php echo $form->textField($model,'ProductName',array('class'=>'disabled input_size3','disabled'=>'disabled')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'Color'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'Color',array('class'=>'input_size4')); ?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'Style'); ?>: </td>	
			<td>
				<?php echo $form->textField($model,'Style',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'ProductDetail'); ?>: </td>
			<td colspan="3">
				<?php echo $form->textField($model,'ProductDetail',array('class'=>'input_size3')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'VendorCode'); ?>: </td>
			<td colspan="3">
				<?php echo $form->textField($model,'VendorCode',array('style'=>'width:500px;')); ?>
				&nbsp;&nbsp;<a class="product" href="<?=Yii::app()->createUrl('psi/vendorPop')?>">供应商</a>
			</td>			
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'ProdPackL_cm'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'ProdPackL_cm',array('class'=>'input_size4')); ?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'ProdPackW_cm'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'ProdPackW_cm',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'ProdPackH_cm'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'ProdPackH_cm',array('class'=>'input_size4')); ?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'WeightG'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'WeightG',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'BoxSizeL_cm'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'BoxSizeL_cm',array('class'=>'input_size4')); ?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'BoxSizeW_cm'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'BoxSizeW_cm',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'BoxSizeH_cm'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'BoxSizeH_cm',array('class'=>'input_size4')); ?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'WeighttoCust'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'WeighttoCust',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $form->label($model,'BoxQuantity'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'BoxQuantity',array('class'=>'input_size4')); ?>
			</td>
			<td class="td_right"><?php echo $form->label($model,'ProductSize'); ?>: </td>
			<td>
				<?php echo $form->textField($model,'ProductSize',array('class'=>'input_size4')); ?>
			</td>
		</tr>
		<tr>
			<td colspan="4" style="text-align:center;"><?php echo CHtml::submitButton($model->isNewRecord ? '新建' : '更新'); ?></td>
		</tr>	
	</table>
<?php $this->endWidget(); ?>
</div>